package org.huatek.anders.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import org.huatek.anders.service.ApiCoreSenderService;
import org.huatek.anders.service.ApiPaymentSenderService;
import org.huatek.anders.service.PaymentNotifySenderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author anders
 * @date 2018-11-14 14:53
 **/
@RestController
public class TestSendRabbitController {

    @Reference
    private PaymentNotifySenderService paymentNotifySenderService;
    @Reference
    private ApiCoreSenderService apiCoreSenderService;
    @Reference
    private ApiPaymentSenderService apiPaymentSenderService;

    @GetMapping("/hi/rabbit")
    public void hiRabbit(){
        paymentNotifySenderService.sender("hello,client==========");
    }

    @GetMapping("/get/order/list")
    public void  getOrderList(){
        apiPaymentSenderService.order("订单管理");
    }
    @GetMapping("/query/order")
    public void  queryOrder(){
        apiPaymentSenderService.orderQuery("查询订单");
    }
    @GetMapping("/get/order/detail")
    public void  queryOrderDetail(){
        apiPaymentSenderService.orderDetailQuery("订单详情");
    }




    @GetMapping("/get/user/list")
    public void  getUserList(){
        apiCoreSenderService.user("用户管理");
    }
    @GetMapping("/query/user")
    public void  queryUser(){
        apiCoreSenderService.userQuery("查询用户");
    }

}
